package com.dsg.dao.oil;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsg.entity.account.DsgAccountTrade;
import com.dsg.entity.bank.DsgBankDetail;
import com.dsg.entity.dto.RecentOilDto;
import com.dsg.entity.oil.DsgOilDataDetail;
import com.dsg.util.BaseDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 入油数据明细 Mapper 接口
 * </p>
 *
 * @author system
 * @since 2020-07-02
 */
@Repository
public interface DsgOilDataDetailMapper extends BaseDao<DsgOilDataDetail> {
    List<RecentOilDto> selectRecent(String ownsId, String carNo);

    /**
     * 查詢需銀行過數入油數據
     *
     * @param dsgBankDetail
     * @return
     */
    List<DsgOilDataDetail> selectDsgBankOilDataDetail(@Param("en") DsgBankDetail dsgBankDetail);

    /**
     * 查询重复数据
     *
     * @param dsgOilDataDetail
     * @return
     */
    List<DsgOilDataDetail> selectRepeatList(@Param("en") DsgOilDataDetail dsgOilDataDetail);

    Integer selectByCar(String carNo);

    /**
     * 費用調整分頁查詢
     * @param page
     * @param dsgAccountTrade
     * @return
     */
    List<DsgAccountTrade> selectListAdj(Page page, @Param("en") DsgAccountTrade dsgAccountTrade);
}
